﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JustMetClient.Launch.Helpers
{
    class UpdateHelper
    {
        //原要对启动失败的情况做强制升级
        //string SettingsFile = DirTool.Combine(AppRoot, "settings.ini");
        //string VersionUrl = IniTool.GetStringValue(SettingsFile, "WebAPI", "VersionInfo", "http://10.73.58.244:8096/imosclient/update/getNewVersion");
        //Dictionary<string, string> Relative = new Dictionary<string, string>() { { "|AppRoot|", AppRoot }, };

        //if (!isStart)
        //{
        //    AppUpdateTool aut = new AppUpdateTool();
        //    AppUpdateInfo info;

        //    int fgGetVersion = aut.GetNewVersion(VersionUrl, new Version("0.0.0.0"), out info);
        //    if (fgGetVersion >= 0)
        //    {
        //        int fgUpdate = aut.Update(info, DirTool.Combine(AppRoot, "Temp"), Relative);
        //    }

        //    AppLaunchTool.StartNewVersion(AppRoot, AppName);
        //}
    }
}
